package org.springmvc.mybatis;

import org.apache.ibatis.annotations.SelectProvider;
import org.springmvc.entity.BaseEntity;
import tk.mybatis.mapper.annotation.RegisterMapper;
import tk.mybatis.mapper.common.BaseMapper;
import tk.mybatis.mapper.common.ExampleMapper;
import tk.mybatis.mapper.common.Marker;

/**
 * 基础Mapper
 * <pre>
 * 取消了逻辑分页方法
 * 接口详情: https://mapperhelper.github.io/all
 * </pre>
 *
 * @author tangjialin on 2018-08-14.
 */
@RegisterMapper
public interface Mapper<E extends BaseEntity> extends BaseMapper<E>, ExampleMapper<E>, Marker {
    /**
     * 查询记录版本号
     *
     * @param primaryKey 记录主键
     * @return 返回版本号
     */
    @SelectProvider(type = SelectVersionProvider.class, method = "dynamicSQL")
    Integer selectVersionPrimaryKey(Object primaryKey);
}
